import request from '@/utils/request'

// 查询客户列列表
export function listCustomer(query) {
  return request({
    url: '/crm/customer/list',
    method: 'get',
    params: query
  })
}

// 查询客户列列表
export function getList(query) {
  return request({
    url: '/crm/customer/getList',
    method: 'get',
    params: query
  })
}

// 查询客户列列表
export function getMyCustomerList(query) {
  return request({
    url: '/crm/customer/getMyCustomerList',
    method: 'get',
    params: query
  })
}

// 查询客户列详细
export function getCustomer(customerId) {
  return request({
    url: '/crm/customer/' + customerId,
    method: 'get'
  })
}

// 新增客户列
export function addCustomer(data) {
  return request({
    url: '/crm/customer',
    method: 'post',
    data: data
  })
}

// 修改客户列
export function updateCustomer(data) {
  return request({
    url: '/crm/customer',
    method: 'put',
    data: data
  })
}

// 删除客户列
export function delCustomer(customerId) {
  return request({
    url: '/crm/customer/' + customerId,
    method: 'delete'
  })
}

// 选择核心客户列列表
export function chooseCustomer(data) {
  return request({
    url: '/crm/customer/chooseCustomer',
    method: 'post',
    data: data
  })
}

// 添加跟进记录
export function addCrmCustomerTrace(data) {
  return request({
    url: '/crm/customer/addCrmCustomerTrace',
    method: 'post',
    data: data
  })
}

// 添加跟进记录
export function getCrmCustomerAllNoPage(data) {
  return request({
    url: '/crm/customer/getCrmCustomerAllNoPage',
    method: 'post',
    data: data
  })
}

// 转移客户
export function transferCrmCustomer(data) {
  return request({
    url: '/crm/customer/transferCrmCustomer',
    method: 'post',
    data: data
  })
}

// 获取客户信息
export function getCustomerOne(data) {
  return request({
    url: '/crm/customer/getCustomerOne',
    method: 'post',
    data: data
  })
}

// 查询协助的客户列表
export function getCustomerList(data){
  return request({
    url: '/crm/customer/getCustomerList',
    method: 'post',
    data: data
  })
}